﻿using System;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;

namespace HamcoWcs.DAL.Migrations
{
    public partial class A40 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "maintain_record",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false, comment: "主键Id")
                        .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn),
                    Content = table.Column<string>(type: "varchar(1024)", maxLength: 1024, nullable: true, comment: "内容")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MachineName = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true, comment: "保养人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    UnderTaker = table.Column<string>(type: "varchar(20)", maxLength: 20, nullable: true, comment: "保养人")
                        .Annotation("MySql:CharSet", "utf8mb4"),
                    MaintainTime = table.Column<DateTime>(type: "datetime(6)", nullable: false, comment: "维护时间")
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_maintain_record", x => x.Id);
                },
                comment: "维护保养记录")
                .Annotation("MySql:CharSet", "utf8mb4");
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "maintain_record");
        }
    }
}
